package com.ljh.controller;

import com.ljh.service.CollectionService;
import com.ljh.vo.CollectionSongVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/subpkg")
@Api(description = "转后接口管理")
@CrossOrigin
public class CollSongController {

    @Autowired
    public CollectionService collectionService;

    /**
     * 对于集合通过id来进行查找
     * @param listId
     * @return
     */
    @GetMapping("/toSongList")
    @ApiOperation("转后songlist页面操作")
    public CollectionSongVo findById(Integer listId){
        System.out.println(listId);
        CollectionSongVo collSong = collectionService.findCollSong(listId);
        return collSong;
    }
}
